package com.atguigu.easyExcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class ExcelListener extends AnalysisEventListener<UserData1> {

    // 一行一行读取 从第二行开始
    @Override
    public void invoke(UserData1 userData1, AnalysisContext analysisContext) {
        System.out.println(userData1);
    }

    // 读取完成以后作什么
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    // 读取表头

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("读取表头"+headMap);
    }
}
